package messages;

public class DisconnectRsp extends MessageHeader {

	public static final short	DISCONNECT_RSP_ID	= 8;
	private short				resp;

	/* ---------------------------------------------------------------- CONSTRUCTORS */

	/**
	 * @param _destID
	 * @param _srcID
	 * @param _resp
	 */
	public DisconnectRsp( short _destID , short _srcID , short _resp ) {
		super( _destID , _srcID );
		concatCommandID( DISCONNECT_RSP_ID );
		concatResp( _resp );
	}

	/* ---------------------------------------------------------------- PRIVATE */

	/**
	 * @param commandID
	 */
	private void concatCommandID( short commandID ) {
		this.incrementLength( (short) 2 );
	}

	/**
	 * @param _resp
	 */
	private void concatResp( short _resp ) {
		this.resp = _resp;
		this.incrementLength( (short) 2 );
	}

	/* ---------------------------------------------------------------- PUBLIC */

	public short getResp( ) {
		return resp;
	}

	public void setResp( short resp ) {
		this.resp = resp;
	}

	@Override
	public String toString( ) {
		return " [ DISCONNECT_RSP ] = " + super.toString( ) + " | <Command_ID=" + DISCONNECT_RSP_ID
				+ "> | <Resp=" + this.resp + "> | ";
	}
}
